API Documentation
Static Public Member Functions | List of all members
nkGraphics::StructToString Class Reference

Converts enums to string, and vice versa. More...

Static Public Member Functions

static const char * getShaderTypeString (SHADER_TYPE val)
 
static SHADER_TYPE getStringShaderType (const std::string_view &str)
 
static const char * getShaderSemanticString (SHADER_SEMANTIC val)
 
static SHADER_SEMANTIC getStringShaderSemantic (const char *str)
 
static const char * getProgramProfileString (PROGRAM_COMPILATION_PROFILE val)
 
static PROGRAM_COMPILATION_PROFILE getStringProgramProfile (const std::string_view &str)
 
static const char * getBlendString (BLEND val)
 
static BLEND getStringBlend (const std::string_view &str)
 
static BLEND getBlendFromIndex (unsigned int index)
 
static const char * getBlendOpString (BLEND_OP val)
 
static BLEND_OP getStringBlendOp (const std::string_view &str)
 
static BLEND_OP getBlendOpFromIndex (unsigned int index)
 
static const char * getWriteMaskString (COLOR_WRITE_ENABLE val)
 
static COLOR_WRITE_ENABLE getStringWriteMask (const std::string_view &str)
 
static COLOR_WRITE_ENABLE getWriteMaskFromIndex (unsigned int index)
 
static const char * getComparisonFuncString (COMPARISON_FUNC val)
 
static COMPARISON_FUNC getStringComparisonFunc (const std::string_view &str)
 
static COMPARISON_FUNC getComparisonFuncFromIndex (unsigned int index)
 
static const char * getDepthWriteMaskString (DEPTH_WRITE_MASK val)
 
static DEPTH_WRITE_MASK getStringDepthWriteMask (const std::string_view &str)
 
static DEPTH_WRITE_MASK getDepthWriteMaskFromIndex (unsigned int index)
 
static const char * getStencilOpString (STENCIL_OP val)
 
static STENCIL_OP getStringStencilOp (const std::string_view &str)
 
static STENCIL_OP getStencilOpFromIndex (unsigned int index)
 
static const char * getFillModeString (FILL_MODE val)
 
static FILL_MODE getStringFillMode (const std::string_view &str)
 
static FILL_MODE getFillModeFromIndex (unsigned int index)
 
static const char * getCullModeString (CULL_MODE val)
 
static CULL_MODE getStringCullMode (const std::string_view &str)
 
static CULL_MODE getCullModeFromIndex (unsigned int index)
 
static const char * getAddressModeString (TEXTURE_ADDRESS_MODE val)
 
static TEXTURE_ADDRESS_MODE getStringAddressMode (const std::string_view &str)
 
static TEXTURE_ADDRESS_MODE getAddressModeFromIndex (unsigned int index)
 
static const char * getFilteringString (FILTER val)
 
static FILTER getStringFiltering (const std::string_view &str)
 
static FILTER getFilteringFromIndex (unsigned int index)
 
static const char * getUsageString (USAGE val)
 
static USAGE getStringUsage (const char *str)
 
static USAGE getUsageFromIndex (unsigned int index)
 
static const char * getFormatString (FORMAT val)
 
static FORMAT getStringFormat (const std::string_view &str)
 
static FORMAT getFormatFromIndex (unsigned int index)
 
static const char * getBindFlagString (BIND_FLAG val)
 
static BIND_FLAG getStringBindFlag (const char *str)
 
static BIND_FLAG getBindFlagFromIndex (unsigned int index)
 
static const char * getCpuAccessFlagString (CPU_ACCESS_FLAG val)
 
static CPU_ACCESS_FLAG getStringCpuAccessFlag (const char *str)
 
static CPU_ACCESS_FLAG getCpuAccessFlagFromIndex (unsigned int index)
 
static const char * getMiscFlagString (RESOURCE_MISC_FLAG val)
 
static RESOURCE_MISC_FLAG getStringMiscFlag (const char *str)
 
static RESOURCE_MISC_FLAG getMiscFlagFromIndex (unsigned int index)
 
static const char * getPassTypeString (PASS_TYPE val)
 
static PASS_TYPE getStringPassType (const char *str)
 
static const char * getResourceTypeString (RESOURCE_TYPE val)
 
static RESOURCE_TYPE getStringResourceType (const char *str)
 
static std::string_view getTexRenderFlagString (TEX_RENDER_FLAG val)
 
static TEX_RENDER_FLAG getStringTexRenderFlag (const std::string_view &str)
 

Detailed Description

Converts enums to string, and vice versa.

Mainly used for error reporting and data exporting within the component.

Member Function Documentation

◆ getShaderTypeString()

static const char* nkGraphics::StructToString::getShaderTypeString ( SHADER_TYPE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringShaderType()

static SHADER_TYPE nkGraphics::StructToString::getStringShaderType ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getShaderSemanticString()

static const char* nkGraphics::StructToString::getShaderSemanticString ( SHADER_SEMANTIC  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringShaderSemantic()

static SHADER_SEMANTIC nkGraphics::StructToString::getStringShaderSemantic ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getProgramProfileString()

static const char* nkGraphics::StructToString::getProgramProfileString ( PROGRAM_COMPILATION_PROFILE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringProgramProfile()

static PROGRAM_COMPILATION_PROFILE nkGraphics::StructToString::getStringProgramProfile ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBlendString()

static const char* nkGraphics::StructToString::getBlendString ( BLEND  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringBlend()

static BLEND nkGraphics::StructToString::getStringBlend ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBlendFromIndex()

static BLEND nkGraphics::StructToString::getBlendFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getBlendOpString()

static const char* nkGraphics::StructToString::getBlendOpString ( BLEND_OP  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringBlendOp()

static BLEND_OP nkGraphics::StructToString::getStringBlendOp ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBlendOpFromIndex()

static BLEND_OP nkGraphics::StructToString::getBlendOpFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getWriteMaskString()

static const char* nkGraphics::StructToString::getWriteMaskString ( COLOR_WRITE_ENABLE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringWriteMask()

static COLOR_WRITE_ENABLE nkGraphics::StructToString::getStringWriteMask ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getWriteMaskFromIndex()

static COLOR_WRITE_ENABLE nkGraphics::StructToString::getWriteMaskFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getComparisonFuncString()

static const char* nkGraphics::StructToString::getComparisonFuncString ( COMPARISON_FUNC  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringComparisonFunc()

static COMPARISON_FUNC nkGraphics::StructToString::getStringComparisonFunc ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getComparisonFuncFromIndex()

static COMPARISON_FUNC nkGraphics::StructToString::getComparisonFuncFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getDepthWriteMaskString()

static const char* nkGraphics::StructToString::getDepthWriteMaskString ( DEPTH_WRITE_MASK  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringDepthWriteMask()

static DEPTH_WRITE_MASK nkGraphics::StructToString::getStringDepthWriteMask ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getDepthWriteMaskFromIndex()

static DEPTH_WRITE_MASK nkGraphics::StructToString::getDepthWriteMaskFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getStencilOpString()

static const char* nkGraphics::StructToString::getStencilOpString ( STENCIL_OP  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringStencilOp()

static STENCIL_OP nkGraphics::StructToString::getStringStencilOp ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getStencilOpFromIndex()

static STENCIL_OP nkGraphics::StructToString::getStencilOpFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getFillModeString()

static const char* nkGraphics::StructToString::getFillModeString ( FILL_MODE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringFillMode()

static FILL_MODE nkGraphics::StructToString::getStringFillMode ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getFillModeFromIndex()

static FILL_MODE nkGraphics::StructToString::getFillModeFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getCullModeString()

static const char* nkGraphics::StructToString::getCullModeString ( CULL_MODE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringCullMode()

static CULL_MODE nkGraphics::StructToString::getStringCullMode ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getCullModeFromIndex()

static CULL_MODE nkGraphics::StructToString::getCullModeFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getAddressModeString()

static const char* nkGraphics::StructToString::getAddressModeString ( TEXTURE_ADDRESS_MODE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringAddressMode()

static TEXTURE_ADDRESS_MODE nkGraphics::StructToString::getStringAddressMode ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getAddressModeFromIndex()

static TEXTURE_ADDRESS_MODE nkGraphics::StructToString::getAddressModeFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getFilteringString()

static const char* nkGraphics::StructToString::getFilteringString ( FILTER  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringFiltering()

static FILTER nkGraphics::StructToString::getStringFiltering ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getFilteringFromIndex()

static FILTER nkGraphics::StructToString::getFilteringFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getUsageString()

static const char* nkGraphics::StructToString::getUsageString ( USAGE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringUsage()

static USAGE nkGraphics::StructToString::getStringUsage ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getUsageFromIndex()

static USAGE nkGraphics::StructToString::getUsageFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getFormatString()

static const char* nkGraphics::StructToString::getFormatString ( FORMAT  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringFormat()

static FORMAT nkGraphics::StructToString::getStringFormat ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getFormatFromIndex()

static FORMAT nkGraphics::StructToString::getFormatFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getBindFlagString()

static const char* nkGraphics::StructToString::getBindFlagString ( BIND_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringBindFlag()

static BIND_FLAG nkGraphics::StructToString::getStringBindFlag ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBindFlagFromIndex()

static BIND_FLAG nkGraphics::StructToString::getBindFlagFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getCpuAccessFlagString()

static const char* nkGraphics::StructToString::getCpuAccessFlagString ( CPU_ACCESS_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringCpuAccessFlag()

static CPU_ACCESS_FLAG nkGraphics::StructToString::getStringCpuAccessFlag ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getCpuAccessFlagFromIndex()

static CPU_ACCESS_FLAG nkGraphics::StructToString::getCpuAccessFlagFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getMiscFlagString()

static const char* nkGraphics::StructToString::getMiscFlagString ( RESOURCE_MISC_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringMiscFlag()

static RESOURCE_MISC_FLAG nkGraphics::StructToString::getStringMiscFlag ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getMiscFlagFromIndex()

static RESOURCE_MISC_FLAG nkGraphics::StructToString::getMiscFlagFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getPassTypeString()

static const char* nkGraphics::StructToString::getPassTypeString ( PASS_TYPE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringPassType()

static PASS_TYPE nkGraphics::StructToString::getStringPassType ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getResourceTypeString()

static const char* nkGraphics::StructToString::getResourceTypeString ( RESOURCE_TYPE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringResourceType()

static RESOURCE_TYPE nkGraphics::StructToString::getStringResourceType ( const char *  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getTexRenderFlagString()

static std::string_view nkGraphics::StructToString::getTexRenderFlagString ( TEX_RENDER_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringTexRenderFlag()

static TEX_RENDER_FLAG nkGraphics::StructToString::getStringTexRenderFlag ( const std::string_view &  str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

The documentation for this class was generated from the following file: